package com.kaikeba.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * 前端分页插件所需数据格式
 * @param <T>
 */
public class ResultData<T> {

    //每次查询的数据集合
    private List<T> rows = new ArrayList<>();
    //数据总数量
    private int total;

    public ResultData() {
    }

    public ResultData(List<T> rows, int total) {
        this.rows = rows;
        this.total = total;
    }

    @Override
    public String toString() {
        return "ResultData{" +
                "rows=" + rows +
                ", total=" + total +
                '}';
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }
}
